#ifndef KZFHOUGHCIRCLEDETECT_H
#define KZFHOUGHCIRCLEDETECT_H

#include <QPoint>
#include <QDebug>
#include <QList>
#include <QSize>

#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;

typedef struct {
    QPoint centerPoint;
    QSize rect;
    double area;
}kzfCirclebox;
/*
    不保存数据
    输入图象,输出坐标
*/
class kzfHoughCircleDetect
{

public:
    kzfHoughCircleDetect();

public:
    void imageBasicInformation(Mat& src);   //图像基本信息

    Mat houghCirclePre(Mat& srcPre);        //霍夫圆检测预处理
    void houghCircle(Mat& srcPreHough, Mat& src);     //霍夫圆检测

    Mat RectCirclePre(Mat& srcPre);                                     //面积筛选拟合圆的预处理
    QList<kzfCirclebox> AreaCircles(Mat& AreaInput, Mat& src);          //面积筛选拟合圆检测

    int countPixel(Mat& src, int threshold, bool dir);
    int getCirclePixel(Mat& src, RotatedRect Rect);
};

#endif // KZFHOUGHCIRCLEDETECT_H
